def get_cross_chain_event(data_dict):
    # 事件字典数据
    Lock_action = {}
    Unlock_action = {}

    hash=data_dict["cross_chain_data"]["hash"].lower()
    if data_dict["cross_chain_data"]["input"]["chain"] in ["ETH","BSC","AVAX"]:
        Lock_action["tx_s"] = f"0x{hash}"
    else:Lock_action["tx_s"] = f"{hash}"
    Lock_action["ID_s"] = data_dict["cross_chain_data"]["input"]["chain"]
    Lock_action["ID_d"] = data_dict["cross_chain_data"]["output"]["chain"]
    Lock_action["asset_s"] = data_dict["cross_chain_data"]["input"]["asset"]
    Lock_action["amount_s"] = data_dict["cross_chain_data"]["input"]["amount"]
    Lock_action["asset_d"] = data_dict["cross_chain_data"]["output"]["asset"]
    Lock_action["to_d"] = data_dict["cross_chain_data"]["outbounds"][1]["to"]

    if data_dict["cross_chain_data"]["input"]["chain"] in ["ETH", "BSC"]:
        Unlock_action["tx_s"] = f"0x{hash}"
    else:
        Unlock_action["tx_s"] = f"{hash}"
    Unlock_action["ID_d"] = data_dict["cross_chain_data"]["output"]["chain"]
    Unlock_action["asset_d"] = data_dict["cross_chain_data"]["output"]["asset"]
    Unlock_action["amount_d"] = data_dict["cross_chain_data"]["outbounds"][1]["amount"]
    Unlock_action["to_d"] = data_dict["cross_chain_data"]["outbounds"][1]["to"]

    return Lock_action,Unlock_action

def get_cross_chain_multichain_event(data_dict):
    # 事件字典数据
    Lock_action = {}
    Unlock_action = {}

    Lock_action["tx_s"] = data_dict["cross_chain_data"]["srcTransactionHash"]
    Lock_action["ID_s"] = data_dict["cross_chain_data"]["fromchainName"]
    Lock_action["ID_d"] = data_dict["cross_chain_data"]["tochainName"]
    if ("srcTokenName" in data_dict):
        Lock_action["asset_s"] = data_dict["cross_chain_data"]["srcTokenName"]
    else:Lock_action["asset_s"] =""
    if("srcAmount" in data_dict ):
        Lock_action["amount_s"] = data_dict["cross_chain_data"]["srcAmount"]
    else:Lock_action["amount_s"] =""
    if("destTokenName" in data_dict):
        Lock_action["asset_d"] = data_dict["cross_chain_data"]["destTokenName"]
    else:Lock_action["asset_d"] =""
    if("destTokenAddress" in data_dict):
        Lock_action["to_d"] = data_dict["cross_chain_data"]["destTokenAddress"]
    else:Lock_action["to_d"] =""

    Unlock_action["tx_s"] = data_dict["cross_chain_data"]["srcTransactionHash"]
    Unlock_action["ID_d"] = data_dict["cross_chain_data"]["tochainName"]
    if ("destTokenName" in data_dict):
        Unlock_action["asset_d"] = data_dict["cross_chain_data"]["destTokenName"]
    else:Unlock_action["asset_d"] =""
    if("destAmount" in data_dict ):
        Unlock_action["amount_d"] = data_dict["cross_chain_data"]["destAmount"]
    else:Unlock_action["amount_d"] =""
    if("destTokenAddress" in data_dict):
        Unlock_action["to_d"] = data_dict["cross_chain_data"]["destTokenAddress"]
    else:Unlock_action["to_d"] =""
    return Lock_action,Unlock_action

